﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPizaPiola.master" AutoEventWireup="true" CodeFile="frmEstructuraArticulo.aspx.cs" Inherits="frmEstructuraArticulo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script language="javascript" type="text/javascript">
        function ValidarArticulo(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
        function ValidarComponente(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
    </script>
    <style type="text/css">
        .style7
        {
            width: 100%;
        }
        .style8
        {
            width: 140px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style7">
        <tr>
            <td align="center" colspan="5">
                <asp:Label ID="LblTitulo" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Size="Large" Text="Estructura de Articulos"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Label ID="LblId" runat="server" Text="Codigo de Articulo:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropArticulo" runat="server">
                </asp:DropDownList>
                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                    ClientValidationFunction="ValidarArticulo" ControlToValidate="DropArticulo" 
                    ErrorMessage="Seleccione un articulo" 
                    onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Label ID="LblComponente" runat="server" Text="Componente:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropComponente" runat="server">
                </asp:DropDownList>
                <asp:CustomValidator ID="CustomValidator2" runat="server" 
                    ClientValidationFunction="ValidarComponente" ControlToValidate="DropComponente" 
                    ErrorMessage="Seleccione un componente valido" 
                    onservervalidate="CustomValidator2_ServerValidate">*</asp:CustomValidator>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Button ID="btnAgregar" runat="server" Text="Agregar" />
            </td>
            <td colspan="3" rowspan="5">
                <asp:GridView ID="GridView1" runat="server" BackColor="LightGoldenrodYellow" 
                    BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" 
                    GridLines="None">
                    <FooterStyle BackColor="Tan" />
                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                </asp:GridView>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" />
                <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" />
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

